home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
Rinaldi
/
HC 1.2 & 2.0
/
Menu 2.1.cpt
/
Menu 2.1
/
card_4359.txt
< prev
next >
Wrap
Text File
|
1991-08-18
|
14KB
|
640 lines
-- card: 4359 from stack: in.1
-- bmap block id: 0
-- flags: 0000
-- background id: 2661
-- name:
----- HyperTalk script -----
on ParseParam Prompt,Default
put "Menu" && Q(short name of the target) into cd fld "Cmd"
-- ask for correct number of parameters
put "," into Cmd
get empty
put 0 into Nb
repeat until (it = "*") or (Nb = number of items of Prompt)
Ask item Nb + 1 of Prompt with item Nb + 1 of Default
if the Result is "Cancel"
then exit to HyperCard
if it ≠ empty
then put quote & it & quote & "," after Cmd
else get "*"
add 1 to Nb
end repeat
delete last char of cmd
put Cmd after cd fld "Cmd"
DoMenuXCMD
end ParseParam
on DoMenuXCMD
-- execute content of field "Cmd"
do card field "Cmd"
if the Result ≠ empty
then
if value of word 2 of cd fld "Cmd" is in "List,Find"
then
if first word of the Result ≠ "Error"
then
put the Result into cd fld "Result"
show btn "box"
show cd fld "Result"
else answer the Result
else answer the Result
end if
end DoMenuXCMD
function Q what
return quote & what & quote
end Q
on closeCard
hide btn "Box"
hide cd fld "REsult"
end closeCard
-- part 1 (field)
-- low flags: 00
-- high flags: 0007
-- rect: left=42 top=5 right=77 bottom=426
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: MenuDef1
-- part 2 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=107 top=315 right=332 bottom=474
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Cmd
-- part 5 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=78 top=162 right=182 bottom=149
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Install
----- HyperTalk script -----
on mouseUp
put "Menu " & Q("Install") into card field "Cmd"
IF cd fld "MenuDef1" ≠ empty
then put "," & "card field" && Q("MenuDef1") after cd fld "Cmd"
IF cd fld "MenuDef2" ≠ empty
then put "," & "card field" && Q("MenuDef2") after cd fld "Cmd"
DoMenuXCMD
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=177 top=162 right=182 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Insert
----- HyperTalk script -----
on mouseUp
ParseParam "New item :,Menu name :,Before item name : (* = end),Before subItem" & " name : (* = end)","New Item,MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=276 top=162 right=182 bottom=347
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Change
----- HyperTalk script -----
on mouseUp
ParseParam "New name :,Menu name :,Item name :,subItem name :", "New Item,MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=276 top=185 right=205 bottom=347
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Enable
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=78 top=185 right=205 bottom=149
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Check
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=78 top=208 right=228 bottom=149
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: List
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,*"
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=177 top=208 right=228 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Find
----- HyperTalk script -----
on mouseUp
ParseParam "Item to find :","Item 1"
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=375 top=162 right=182 bottom=446
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Remove
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 13 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=276 top=208 right=228 bottom=347
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: IsChecked
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name :,subItem name :", "MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 14 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=276 top=277 right=297 bottom=347
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Switch
----- HyperTalk script -----
on mouseUp
global MenuBarGlobal
if number of items of MenuBarGlobal ≠ 2
then ParseParam"About name :,Help name :","About…,Help…"
else
put "Menu" && Q("Switch") into cd fld "Cmd"
DoMEnuXCMD
end if
end mouseUp
-- part 15 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=375 top=208 right=228 bottom=446
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: IsEnabled
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name :,subItem name :", "MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 17 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=396 top=299 right=316 bottom=474
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DoField
----- HyperTalk script -----
on mouseUp
DoMenuXCMD
end mouseUp
-- part 18 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=375 top=185 right=205 bottom=446
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Disable
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 19 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=177 top=185 right=205 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Uncheck
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
end mouseUp
-- part 20 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=78 top=231 right=251 bottom=149
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: GetCmd
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 21 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=177 top=231 right=251 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: SetCmd
----- HyperTalk script -----
on mouseUp
ParseParam "Cmd char :,Menu name :,Item name :,SubItem name :", "H,MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 22 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=276 top=231 right=251 bottom=347
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: GetIcon
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 23 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=375 top=231 right=251 bottom=446
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: SetIcon
----- HyperTalk script -----
on mouseUp
ParseParam "ICON ID :,Menu name :,Item name :,SubItem name :", "257,MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 24 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=78 top=254 right=274 bottom=149
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: GetStyle
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 25 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=177 top=254 right=274 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: SetStyle
----- HyperTalk script -----
on mouseUp
ParseParam "Style : (N B I U O S C E),Menu name :,Item name :,SubItem name :", "BI,MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 26 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=276 top=254 right=274 bottom=347
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: GetSicn
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 27 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=375 top=254 right=274 bottom=446
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: SetSicn
----- HyperTalk script -----
on mouseUp
ParseParam "SICN ID :,Menu name :,Item name :,SubItem name :", "257,MyMenu,Item 1,Subitem 1.1"
end mouseUp
-- part 28 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=16 top=305 right=342 bottom=58
-- title width / last selected line: 0
-- icon id / first selected line: 29114 / 29114
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Back
----- HyperTalk script -----
on mouseUp
go prev
end mouseUp
-- part 34 (field)
-- low flags: 00
-- high flags: 0007
-- rect: left=42 top=76 right=148 bottom=426
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: MenuDef2
-- part 35 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=42 top=4 right=149 bottom=428
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Result
-- part 36 (button)
-- low flags: 80
-- high flags: 2002
-- rect: left=37 top=0 right=12 bottom=49
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Box
----- HyperTalk script -----
on mouseUp
hide me
hide cd fld "REsult"
end mouseUp
-- part 37 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=177 top=277 right=297 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Count
----- HyperTalk script -----
on mouseUp
ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,*"
end mouseUp
-- part 38 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=78 top=277 right=297 bottom=149
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: ?
----- HyperTalk script -----
on mouseUp
ParseParam "Command name :","Switch"
end mouseUp
-- part contents for card part 1
----- text -----
MyMenu
<Bitem 1<I,subItem 1.1<B,SubItem 1.2<I,<OSubItem 1.3
^257Item 2,(SubItem 2.1,subItem 2.2,(-,SubItem 2.3
item 3<i
¨257
-- part contents for card part 2
----- text -----
Menu "Switch"
-- part contents for card part 34
----- text -----
OtherMenu
Styles,Normal,<Bbold,<IItalic,<UUnderline,<OOutline,<SShadow
Big Fred,^257
Small Fred,¨257
-- part contents for card part 35
----- text -----
File,Utilities,Groupies,Markers